#ifndef GEM_SERVER_H
#define GEM_SERVER_H

#include <SFML/Network.hpp>
#include <Box2D/Box2D.h>

#include "ContactObject.h"
#include "GemColour.h"

class GemServer : public ContactObject {
public :
	/*Variables pour Box2D*/
	b2BodyDef bodyDef;
	b2Vec2 position;
	b2PolygonShape box; 
	b2Vec2 vel;
	b2Body* body; 
	b2FixtureDef fixtureDef;
	int id;

	int width;
	bool picked;
	GemColour colour;
	int points;

	GemServer(GemColour colour, float posX, float posY, int i);
	void initialiseB2D(b2World* world);
	void send(sf::TcpSocket& socket);
	void disappear();

	virtual void startContact();
	virtual void endContact();
};

#endif